<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
    private $breacum = '';
    public $setting='';
    function  __construct(){
        parent::__construct();
             
    }
    function index(){ 
        $data['content'] = $this->load->view(
            'default/content','',true
            );
        $this->breadcrumbs('6');
        $data['breadcrumb'] = $this->breacum;             
        $this->load->view('default/index',$data);
    }
    
    
    function breadcrumbs($id=0){
        $catget = $this->common_model->getone('product_category',array('id'=>$id));
        if(!empty($catget)){
            if(!empty($this->breacum)){
                $this->breacum =$catget->title.'-->'.$this->breacum;  
            }else $this->breacum =$catget->title;
            if($catget->parentid!=0){
                $this->breadcrumbs($catget->parentid);               
                
            }
        }      
    }
    function test(){
        //id=197512428&total=2400&new=30&uid=1&oid=7212&sig=6c0bd6071ca992a3ec24d80ed1e2f9c7
        $id=197512428;
        $new=30;
        $userid=1;
       // $SECRET
        $sig1 = md5($id . ':' . $new . ':' . $userid . ':' . $SECRET);
        echo $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
        exit();
       // $this->db->like('code','456');
        //$this->db->like('code','6');
        //$this->db->select('id','code','title');
       // $rr = $this->db->get('product');
        //$tt= $rr->result();
        $a[]=2;
        $a[]=1;
        $a[]=3;
        sort( $a );// sapxep mang
        print_r($a);
        echo in_array ('323', array());
        
        $prefs = array (
               'show_next_prev'  => TRUE,
               'next_prev_url'   => 'http://example.com/index.php/calendar/show/'
             );

$this->load->library('calendar', $prefs);

echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4));
        
    }
}